package com.nova.bluetooth.helpUtils;


import org.greenrobot.eventbus.EventBus;

public class EventBusUtil {
    public static void register(Object object){
        if(!EventBus.getDefault().isRegistered(object)){
            EventBus.getDefault().register(object);
        }
    }

    public static void unRegister(Object object){
        if(EventBus.getDefault().isRegistered(object)){
            EventBus.getDefault().unregister(object);
        }
    }

    public static void postMessage(Object object) {
        EventBus.getDefault().post(object);
    }

    public static void postStickyMessage(Object object) {
        EventBus.getDefault().postSticky(object);
    }

}
